<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>订单支付</title>
    <script type="text/javascript" th:src="@{/js/jquery-3.3.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/qrcode.min.js}"></script>
</head>
<body>
<h1>测试页面</h1>
<div id="qrcode" style="width:165px; height:165px; margin-top:15px;"></div>

<script type="text/javascript">
    var qrcode = new QRCode(document.getElementById("qrcode"), {
        width: 165,
        height: 165
    });

    $(function () {
        var orderId = 1;
        $.post("http://localhost:8989/PAYERVER/wechat/getQRcode", {"id": 1}, function (result) {
            qrcode.makeCode(result.data);
        });

        var i = null;
        // i = setInterval(function () {
        //     post("wxPay/getPayStatus", {"orderid": orderId}, function (result) {
        //         if (result.data === "ok") {
        //             clearInterval(i);
        //             reload(base + "orders/list");
        //         }
        //     });
        // }, 1000);
    });
</script>

</body>
</html>